FROM python:3.9.13-slim-buster
WORKDIR /app
COPY script/* /app
#RUN sed -i -E "s/\w+.debian/mirrors.tuna.tsinghua.edu/g" /etc/apt/sources.list
COPY script/sources.list /etc/apt/sources.list
RUN apt-get update \
    && apt-get install sshpass -y \
    && apt-get install rsync -y
COPY script/ansible.cfg /etc/ansible/ansible.cfg
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
CMD ["python","alb_check.py"]